﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Text;

namespace BlueCMS.Core.IoC.Configuration
{
    public class InstanceConfiguration : ConfigurationElement
    {
        [ConfigurationProperty("name", DefaultValue = "default", IsKey = true)]
        public string Name
        {
            get { return (string)base["name"]; }
            set { base["name"] = value; }
        }

        [ConfigurationProperty("implementation", IsRequired = true)]
        public string Implementation
        {
            get { return (string)base["implementation"]; }
            set { base["implementation"] = value; }
        }

        [ConfigurationProperty("", IsDefaultCollection = true, IsRequired = false)]
        [ConfigurationCollection(typeof(ParameterConfigurationCollection), AddItemName = "parameter")]
        public ParameterConfigurationCollection Parameters
        {
            get { return ((ParameterConfigurationCollection)base[""]); }
        }
    }
}
